<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>判断两个对象的键值对是否相同</title>
</head>
<body>
    <script>
        var num1={
				name:'jhjk',
				age:12,
			} 
			var num2={
                name:'jhjk',
				age:15,

            }
             for(arr1 in num1){};
             for(arr2 in num2){};
             if(num1[arr1]==num2[arr2]){
                alert('是')
             }       
             else{
                alert('不是')
             }
    </script>
</body>
</html>